package com.jielihaofeng.level2;

/**
 * @author Johnnie Wind
 * @description Checked Exception 异常
 * @date 2021/11/30 14:14
 */
public class CheckedExceptionTest {
    public static void main(String[] args) {
        try {
            throwChecked1();
        } catch (Exception e) {
            e.printStackTrace();
        }
        throwChecked2();
    }

    public static void throwChecked1() throws Exception{
        throw new Exception("throwChecked1：我是Checked Exception异常1");
    }

    public static void throwChecked2() {
        try {
            throw new Exception("throwChecked2：我是Checked Exception异常2");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
